// app.js
import { loadFontFace } from '/tool/HttpRequest.js'
import { InitializeMiniProgram } from './InitializeMiniProgram'
App({
    onLaunch() {
        console.log(getCurrentPages(), '-------------------')
        // this.globalData.downloadFileAddress = new InitializeMiniProgram('111').FileHost
        this.globalData.MiniProgramConfig = new InitializeMiniProgram('111')
        loadFontFace('https://rwstatic.tentons.cn/web/h5/font/BalooBhai-Regular.otf')
        loadFontFace('https://rwstatic.tentons.cn/web/h5/font/HiraMinProN-W3.ttf')
        loadFontFace('https://rwstatic.tentons.cn/web/h5/font/KoseFontSC-Regular.otf')
    },
    onShow() {
        // new InitializeMiniProgram('111')
    },
    globalData: {
        statusBarHeight: wx.getWindowInfo().statusBarHeight,//手机状态栏高度
        downloadFileAddress: '',// 下载目录
        MiniProgramConfig: {},
        AliyunOSSTSTConfig: {},//阿里云上传TST配置，从后端服务拿取
        wxLogin() {
            return new Promise(async (resolve, reject) => {
                wx.login({
                    success: function (res) {
                        resolve(res)
                    },
                })
            })
        },
    }
})
